{template header}
<link rel="stylesheet" type="text/css" href="{SITE_URL}static/js/wangeditor/pcwangeditor/css/wangEditor.min.css">
 <script src="{SITE_URL}static/js/jquery-1.11.3.min.js" type="text/javascript"></script>
 <script type="text/javascript" src="{SITE_URL}static/js/jquery.qrcode.min.js"></script>
<div class="layui-container news-detail">
	<div class="layui-row layui-col-space40">
		<div class="layui-col-sm8">
		 	<div class="detail-main">
		 		<ul id="detail-handel">
		 			<li class="weibo"><a href="javascript:void((function(s,d,e,r,l,p,t,z,c){var%20f='http://v.t.sina.com.cn/share/share.php?appkey=1515056452',u=z||d.location,p=['&amp;url=',e(u),'&amp;title=',e(t||d.title),'&amp;source=',e(r),'&amp;sourceUrl=',e(l),'&amp;content=',c||'gb2312','&amp;pic=',e(p||'')].join('');function%20a(){if(!window.open([f,p].join(''),'mb',['toolbar=0,status=0,resizable=1,width=440,height=430,left=',(s.width-440)/2,',top=',(s.height-430)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent,'','','{$topicone['image']}', '推荐 {$topicone['author']} 的文章《{$topicone['title']}》','{url topic/getone/$topicone['id']}','页面编码gb2312|utf-8默认gb2312'));"><i class="layui-icon layui-icon-news-weibo"></i></a></li>
		 			<li class="wechat "><a href="javascript:;"><i class="layui-icon layui-icon-news-wechat share-weixin"></i></a></li>
		 			<li class="space"><a href="javascript:shareqq()" ><i class="layui-icon layui-icon-news-space"></i></a></li>
		 			<li class="review num"><a href="javascript:;"><i class="layui-icon layui-icon-news-review2"></i><span>{$topicone['articles']}</span></a></li>
		 			   {if $isfollowarticle}
		 			<li class="collect num"><a href="{url favorite/delfavoratearticle/$topicone['id']}"><i class="layui-icon layui-icon-news-collect" style="color: rgb(255, 102, 102);"></i><span>{$topicone['likes']}</span></a></li>
		 		 {else}
		 		 <li class="collect num"><a href="{url favorite/topicadd/$topicone['id']}"><i class="layui-icon layui-icon-news-collect"></i><span>{$topicone['likes']}</span></a></li>
		 		 
		 		  {/if}
		 		</ul>
		 		<div class="detail-cont">
		 			<h1>{$topicone['title']}</h1>
		 			<div class="newsClass"><span>{$cat_model['name']}</span>{$topicone['author']} <b>{$topicone['viewtime']}</b> <i>收藏1289</i> <i>阅读 {$topicone['views']}</i></div>
		 			
	 			  <div class="wangEditor-container" style="border:none;">
            	<div class="wangEditor-txt" style="padding:0px;">
            	   
      
                     {if $topicone['price']!=0&&$haspayprice==0&&$user['uid']!=$topicone['authorid']}
  {eval echo replacewords($topicone['freeconent']);}
  
                         <div class="box_toukan ">

										{if $user['uid']==0}
											<div onclick="login()" class="thiefbox font12 mar-t10" style="color:#fff;text-decoration:none;padding:5px 10px 5px 10px;margin-top:10px;" ><i class="icon icon-lock font-12"></i> &nbsp;更多阅读需支付&nbsp;$topicone['price']&nbsp;&nbsp;{eval if ($topicone['readmode']==2) echo '财富值'; }{eval if ($topicone['readmode']==3) echo '元'; }……</div>
											{else}
											<div onclick="viewtopic($topicone['id'])"  class="thiefbox font12 mar-t10" style="color:#fff;text-decoration:none;padding:5px 10px 5px 10px;margin-top:10px;" ><i class="icon icon-lock font-12"></i> &nbsp;更多阅读需支付&nbsp;$topicone['price']&nbsp;&nbsp;{eval if ($topicone['readmode']==2) echo '财富值'; }{eval if ($topicone['readmode']==3) echo '元'; }……</div>
											{/if}


										</div>
                   {else}
                   {eval echo  replacewords(clearlinkref(htmlspecialchars_decode($topicone['describtion'])));}
           
              
                    {/if}


</div>
</div>
		 		</div>
		 		<div class="detail-label">
		 		   <!--{if $taglist}-->
		 			<i class="layui-icon layui-icon-news-label"></i>
		 			<span class="layui-breadcrumb">
		 			    
                                       <!--{loop $taglist $tag}-->

  <a href="javascript:;" title="{$tag['tagname']}" target="_blank" class="project-tag-14">{$tag['tagname']}/</a>
                        
               
            
                
					 
			 			
					</span>
					    <!--{/loop}--><!--{else}--><!--{/if}-->
		 		</div>
		 		<div class="detail-comment">
		 			<p>全部评论 <span>{$topicone['articles']}</span></p>
	 <div class="layui-form layui-form-pane">
          <form action="/jie/reply/" method="post">
            <div class="layui-form-item layui-form-text">
              <a name="comment"></a>
              <div class="layui-input-block">
               <textarea  placeholder="写下你的评论..." class="comment-area layui-textarea"></textarea>
              </div>
            </div>
            <div class="layui-form-item">
               <input type="hidden" id="artitle" value="{$topicone['title']}" />
    <input type="hidden" id="artid" value="{$topicone['id']}" />
    {if !$user['uid']}     <a href="{url user/login}" class="layui-btn btn-cm-submit  {if !$user['uid']} layui-btn-disabled{/if}"  name="comments" id="comments">登录后回复</a>
          {else}
              <div class="layui-btn btn-cm-submit "  name="comments" id="comments">提交回复</div>
          
    {/if}
    
          
            </div>
          </form>
        </div>
	 				<ul id="replyCont">
	 				  <!--{loop $commentlist $index $comment}-->
	 					<li>
	 						<div class="img"><a href=""><img src="{$comment['avatar']}"></a></div><div class="readCom">
	 							<p class="name"><a href="">{$comment['author']}</a><span>{$comment['time']}</span><span class="goods button_commentagree" id='{$comment['id']}'><em>{$comment['supports']}</em><i class="layui-icon layui-icon-news-good"></i></span></p>
	 							<p class="txt"> {$comment['content']}</p>
	 							
	 						</div>
	 					</li>
	 					   <!--{/loop}-->
	 				</ul>
	 				{template page}
		 		</div>
		 	</div>
		</div>
		<div class="layui-col-sm4">
			<div class="detail-side">
				<div class="person">
					<a class="img"><img src="{$member['avatar']}"></a>
					<span class="name">{$member['username']}</span>
					<span class="num">{$member['articles']}篇文章</span>
					  {if  $is_followedauthor}
					<a href="javascript:;" id="attenttouser_{$member['uid']}" data-uid="{$member['uid']}" class="btnattention layui-btn layui-btn-sm focusOn following">已关注</a>
					    {else}
					    <a href="javascript:;" id="attenttouser_{$member['uid']}" data-uid="{$member['uid']}" class="btnattention layui-btn layui-btn-sm focusOn follow">关注</a>
					     {/if}
				</div>
				<div class="list">
					<p>热门推荐</p>
					<ul>
						 <!--{eval $weektopiclist = $this->fromcache("weektopiclist");}-->

        <!--{loop $weektopiclist $nindex $topic}-->
						<li><a href="{url topic/getone/$topic['id']}"><img style="width:121px;height:78px;" src="{$topic['image']}"><span>{$topic['title']}</span></a></li>
				   <!--{/loop}-->
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div id="silde"><a id="refresh"><i class="layui-icon layui-icon-refresh"></i></a><a id="scroll"><i class="layui-icon layui-icon-up"></i></a></div>
</div>
<div class="modal share-wechat animated" style="display: none;"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" data-dismiss="modal" class="close">×</button></div> <div class="modal-body"><h5>打开微信“扫一扫”，打开网页后点击屏幕右上角分享按钮</h5> <div data-url="{url topic/getone/$topicone['id']}" class="qrcode" title="{url topic/getone/$topicone['id']}"><canvas width="170" height="170" style="display: none;"></canvas>
<div id="qr_wxcode">
</div></div></div> <div class="modal-footer"></div></div></div></div>
 <script type="text/javascript">

  function shareqq()
  {
      var p = {
          url: location.href,/*获取URL，可加上来自分享到QQ标识，方便统计*/
          desc: "{eval echo clearhtml(htmlspecialchars_decode( replacewords($topicone['describtion'])),50);}", 
          title : document.title,/*分享标题(可选)*/
          summary : document.title,/*分享描述(可选)*/
          pics : "{$topicone['image']}",/*分享图片(可选)*/
          flash : '', /*视频地址(可选)*/
          //commonClient : true, /*客户端嵌入标志*/
          site: "{$setting['site_name']}"/*分享来源 (可选) ，如：QQ分享*/
      };


      var s = [];
      for (var i in p) {
          s.push(i + '=' + encodeURIComponent(p[i] || ''));
      }
      var target_url = "http://connect.qq.com/widget/shareqq/iframe_index.html?" + s.join('&') ;
      window.open(target_url, 'qq',
              'height=520, width=720');
  }
	$('#qr_wxcode').qrcode("{url topic/getone/$topicone['id']}");
	   //显示微信二维码
	   $(".share-weixin").click(function(){
		
	  	 $(".share-wechat").show();
	   });
	   //关闭微信二维码
	   $(".close").click(function(){
	  	 $(".share-wechat").hide();
	   })

  </script>
{template footer}